//
//  UIButton+Category.h
//  YLB
//
//  Created by Zoo Chow on 17/02/2017.
//  Copyright © 2017 Zoo. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface UIButton (Category)
/**
 * create button just title
 */
+ (UIButton*)createTitleButton:(NSString*)title
                   normalColor:(UIColor*)normalColor
                highlightColor:(UIColor*)highlightColor
                         frame:(CGRect)frame
                          font:(UIFont*)font
                           tag:(NSInteger)tag
                        target:(id)target
                        action:(SEL)action;
/**
 * create image button
 */
+ (UIButton*)createImageButton:(CGRect)frame
                   normalImage:(UIImage*)normalImage
                highlightImage:(UIImage*)highlightImage
                           tag:(NSInteger)tag
                        target:(id)target
                        action:(SEL)action;
/**
 * create image name button
 */
+ (UIButton*)createImageButton:(CGRect)frame
               normalImageName:(NSString*)normalImageName
            highlightImageName:(NSString*)highlightImageName
                           tag:(NSInteger)tag
                        target:(id)target
                        action:(SEL)action;
/**
 * create title button with background image
 */
+ (UIButton*)createTitleButton:(NSString *)title
                   normalColor:(UIColor*)normalColor
                highlightColor:(UIColor*)highlightColor
                   normalImage:(UIImage*)normalImage
                highlightImage:(UIImage*)highlightImage
                         frame:(CGRect)frame
                          font:(UIFont*)font
                           tag:(NSInteger)tag
                        target:(id)target
                        action:(SEL)action;
/**
 *  create title button with background color to generate background image
 */
+ (UIButton*)createTitleButton:(NSString *)title
                   normalColor:(UIColor *)normalColor
                highlightColor:(UIColor *)highlightColor
              normalImageColor:(UIColor *)normalImageColor
           highlightImageColor:(UIColor *)highlightImageColor
                         frame:(CGRect)frame
                          font:(UIFont *)font
                           tag:(NSInteger)tag
                        target:(id)target
                        action:(SEL)action;

- (void)setTitleInSource:(NSArray *)source forState:(UIControlState)state;

@end







































